def func(n):
    if n==1:
        return 1
    else:
        return n*func(n-1)

print(func(5))

def fib(n):
    if n==1 or n==2:
        return 1
    else:
        return fib(n-1)+fib(n-2)

print(fib(9))
for i in range(1, 10):
    print(fib(i), end='\t')
print()

print(abs(-100))

print(divmod(13,4))

print(max('hello'))

print(max([1,2,3,4]))
print(min([1,2,3,4]))

print(sum([1,2,3,4]))

print(pow(2,3))

print(round(3.14))
print(round(3.9))
print(round(3.1415, 2))

print("*"*50)

def fun(num):
    return num%2==1
obj=filter(fun, range(10))
print(list(obj))

def upper(x):
    return x.upper()

new_lst3=["hello", "world"]
obj2=map(upper, new_lst3)
print(list(obj2))

print(format(3.14, '20')) # 数值默认右对齐
print(format('hello', '*<20')) # * 填充；< 左对齐

print(format(20, 'b'))
